package cn.hdr.train.bean;


public class ListNode {
    public int val;
    public ListNode next;
    public ListNode(int x) { val = x; }

    public ListNode addNext(int val){
        this.next = new ListNode(val);
        return this.next;
    }

    public ListNode addNext(ListNode node){
        this.next = node;
        return node;
    }
}